package cn.antank.sdk.constant;

import org.apache.commons.lang3.StringUtils;

public class Status {
	/**
	 * True
	 */
	public static final String Y = "Y";
	/**
	 * False
	 */
	public static final String N = "N";
	
	public static final String STATUS_Y = "Y";	//有效
	public static final String STATUS_N = "N";	//无效
	public static final String STATUS_D = "D";	//delete
	public static final String STATUS_T = "T";	//退票
	public static final String STATUS_U = "U";	//已使用
	public static final String STATUS_L = "L";	//已锁定（比如多人同时操作取票时)
	public static final String STATUS_P = "P";	//暂停Pause
	public static final String STATUS_E = "E";	//Expired
	
	public static boolean isY(String status) {
		return StringUtils.equals(Status.STATUS_Y, status);
	}
	public static boolean isN(String status) {
		return StringUtils.equals(Status.STATUS_N, status);
	}
	public static boolean isU(String status) {
		return StringUtils.equals(Status.STATUS_U, status);
	}
	public static boolean isT(String status) {
		return StringUtils.equals(Status.STATUS_T, status);
	}
	public static boolean isD(String status) {
		return StringUtils.equals(Status.STATUS_D, status);
	}
	public static boolean isL(String status) {
		return StringUtils.equals(Status.STATUS_L, status);
	}
	public static boolean isP(String status) {
		return StringUtils.equals(Status.STATUS_P, status);
	}
	public static boolean isE(String status) {
		return StringUtils.equals(Status.STATUS_E, status);
	}
	public static boolean isYU(String status) {
		return StringUtils.equalsAny(status, Status.STATUS_Y, Status.STATUS_U);
	}
	
}
